-
-
Notifications
You must be signed in to change notification settings - Fork 320
fix: workspace member with fixed version #1715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: workspace member with fixed version #1715
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next-release #1715 +/- ##
===============================================
Coverage ? 98.75%
===============================================
Files ? 60
Lines ? 2655
Branches ? 0
===============================================
Hits ? 2622
Misses ? 33
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
|
nit: you have typo in your commit message |
|
I reviewed the commit in 4.10.1 and it should fix both issues. However, it changes one behavior: if there are both a workspace and a root package, it will bump the version of the workspace, and not the root package. This might be unwanted behavior, as if there is a root package, this is probably the main project the author is working on. We may want to get the version of the root package first (if it exists), and fallback on the version of the workspace. What do you think of it @bearomorphism ? |
|
Actually, I am not familiar with cargo files. @Lee-W wdyt? Which behavior do you think is correct? |
|
Hi @vemilano could you rebase? The current For rebasing: git remote add upstream https://github.com/commitizen-tools/commitizen.git
git fetch upstream
git rebase upstream/master
# fix conflicts
git add commitizen/providers/cargo_provider.py
git rebase --continue
git push origin fix/cargo-workspace-version -f |
|
Hi @woile , apologies for the delay. I checked 4.10.1and it fixes the issues I wanted to fix with this pull request, so rebasing should not be necessary. However, as you said, this version changes the priority of "version reading": firstly workspace version, then package version. It's ok in most cases, except (maybe) when we have both a package and a workspace in the Cargo.toml If a project have both package and workspace in the Cargo.toml, we might want to increase the version of the package, because it's often the main binary/library the author is working on. In this case, we should try to get package version first, then workspace version. It's open to debate, I just wanted to mention this case so that we're sure of the final choice. |
|
Sounds good to me, can you rebase and resolve conflicts? |
Description
Fix 2 things with cargo provider :
workspace.version = "0.1.0"in spec to fix the version of a specific workspace member. It must beversion = "0.1.0", even if it is a workspace memberChecklist
Code Changes
poetry alllocally to ensure this change passes linter check and testsDocumentation Changes
poetry doclocally to ensure the documentation pages renders correctly